package xyz.scootaloo.util;

import java.util.Objects;

/**
 * 集合比较器，用于比较两个集合是否相同
 *
 * @author flutterdash@qq.com
 * @since 2021/3/21 22:53
 */
public class CollectionComparator {

    public static boolean compareIntArray(int[] source, int[] target) {
        Assert.requireNonNull(source);
        Assert.requireNonNull(target);
        if (source.length != target.length)
            return false;
        for (int i = 0; i<source.length; i++) {
            if (source[i] != target[i])
                return false;
        }
        return true;
    }

}
